#!/usr/bin/php
<?

chdir( 'release' );

include 'library/main.inc.php';

Smutty_Main::setLanguage();
Smutty_Main::loadClass( 'Smutty_Test_Suite', 'Smutty_Test' );

$cfg =& Smutty_Config::getInstance();
$cfg->loadConfig( 'library/smutty.cfg' );
$cfg->loadConfig( '../tests/data/app.cfg' );

Smutty_Exception::setErrorReporting( ERR_ALL );

$suite = new Smutty_Test_Suite( '../tests' );

$d = opendir( '../tests' );
while ( $f = readdir($d) )
	if ( substr($f,-8) == 'Test.php' )
		$suite->addTest( substr($f,0,strlen($f)-4) );

$suite->run();

?>
